{% extends "base.html" %}

{% block title %}登录 - 教育管理系统{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card shadow">
            <div class="card-header bg-primary text-white">
                <h3 class="card-title mb-0">用户登录</h3>
            </div>
            <div class="card-body">
                <form method="POST" action="{{ url_for('auth.login') }}">
                    <div class="mb-3">
                        <label for="email" class="form-label">邮箱</label>
                        <input type="email" class="form-control" id="email" name="email" required>
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">密码</label>
                        <input type="password" class="form-control" id="password" name="password" required>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">用户类型</label>
                        <div class="form-check">
                            <input class="form-check-input" type="radio" name="user_type" id="teacher" value="teacher" checked>
                            <label class="form-check-label" for="teacher">教师</label>
                        </div>
                        <div class="form-check">
                            <input class="form-check-input" type="radio" name="user_type" id="student" value="student">
                            <label class="form-check-label" for="student">学生</label>
                        </div>
                    </div>
                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-primary">登录</button>
                    </div>
                </form>
            </div>
            <div class="card-footer text-center">
                <div class="row">
                    <div class="col-6">
                        <a href="{{ url_for('auth.register_teacher') }}">教师注册</a>
                    </div>
                    <div class="col-6">
                        <a href="{{ url_for('auth.register_student') }}">学生注册</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 